//
//  DatabaseHandle.h
//  WatchBallSqlite
//
//  Created by lanou3g on 15/6/5.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@class Model;
@interface DatabaseHandle : NSObject
@property (nonatomic,strong) NSString *fileName;
@property (nonatomic,strong) UIViewController *viewController;


+ (DatabaseHandle*)shardInstnce;

//打开数据库
- (void)openDB;

//关闭数据库
- (void)closeDB;

//插入收藏活动
- (void)insertNewactivity:(Model*)model;

//获取某个收藏活动对象
- (Model*)selectModelWithID:(NSString*)ID;

//获取所有的收藏活动对象
- (NSArray *)selectAllModel;

//判断活动是否被收藏
- (BOOL)isFavoriteModelWithID:(NSString*)ID;

//删除收藏的活动
- (void)deleteModelByID:(NSString *)ID;

//获取 caches 路径
- (NSString*)useCachesPathSqlite:(NSString*)databaseName;

@end
